const children = [
  {
    name: 'BusinessIndex',
    path: 'index',
    component: () => import('@/views/business/index.vue'),
    meta: {
      menu: true, // 是否显示底部菜单
      auth: true, // 是否需要验证登录
      navBar: false, // 是否显示头部导航栏
      navBarTitle: '', // 头部导航栏标题
    }
  },
  {
    name: 'Login',
    path: 'login',
    component: () => import('@/views/business/login.vue'),
    meta: {
      menu: false
    }
  },
  {
    name: 'Register',
    path: 'register',
    component: () => import('@/views/business/register.vue'),
    meta: {
      menu: false
    }
  },
  {
    name: 'Profile',
    path: 'profile',
    component: () => import('@/views/business/profile.vue'),
    meta: {
      navBar: true,
      navBarTitle: '基本资料',
      auth: true,
    }
  },
  {
    name: 'Email',
    path: 'email',
    component: () => import('@/views/business/email.vue'),
    meta: {
      navBar: true,
      navBarTitle: '邮箱认证',
      auth: true,
    }
  },
  {
    name: 'Wallet',
    path: 'wallet',
    component: () => import('@/views/business/wallet.vue'),
    meta: {
      navBar: true,
      navBarTitle: '我的钱包',
      auth: true,
    }
  },
  {
    name: 'Pay',
    path: 'pay',
    component: () => import('@/views/business/pay.vue'),
    meta: {
      navBar: true,
      navBarTitle: '充值',
      auth: true,
    }
  },
  {
    name: 'Checkout',
    path: 'checkout',
    component: () => import('@/views/business/checkout.vue'),
    meta: {
      navBar: true,
      navBarTitle: '收银台',
      auth: true,
    }
  },
  {
    name: 'Record',
    path: 'record',
    component: () => import('@/views/business/record.vue'),
    meta: {
      navBar: true,
      navBarTitle: '消费记录',
      auth: true,
    }
  },
]

export default {
  name: 'Business',
  path: '/business',
  component: {
    template: `<router-view></router-view>`
  },
  children,
  redirect: '/business/index'
}